package com.data.modules.smzh.mapper;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.data.modules.smzh.entity.Facedevice;
import com.data.modules.smzh.entity.OftenContact;
import com.data.modules.smzh.vo.SmDeviceVo;
import com.data.modules.smzh.vo.SmUserVo;
import com.data.modules.system.entity.Account;
import com.data.modules.system.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: facedevice
 * @Author: data-boot
 * @Date:   2022-11-29
 * @Version: V1.0
 */
public interface FacedeviceMapper extends BaseMapper<Facedevice> {

    List<Map> queryDeviceByUserId(Integer userId);

    String queryDoorPassword(String userId);

    int updateDoorPassword(String userid, String newOpenDoorPassword, String serNo);

    List<Map> queryPersonFace(String userId);

    IPage<Facedevice> pageList(Page<Facedevice> page,  @Param("data")Facedevice facedevice);

    Facedevice getDeviceInfo(String serialNo, Integer type);

    List<SmDeviceVo> seachManageInfoBySerialNo(@Param("serialNo") String serialNo,@Param("length") Integer length);

    String queryDevelAppId(@Param("appId") String appId);

    String queryAccountMobile(@Param("appId") String appId);

    List<Map> queryDeviceByGroupBy(@Param("data") SmDeviceVo smDeviceVo);

    Long saveDevelappInfo(String username,Long id);

    List<SmDeviceVo> queryManageInfoByBuidingNo(String serialNo);

    List<SmDeviceVo> queryDeviceInfo(String mobile);

    List<String> queryAppRegistId(@Param("uniqueNo") String uniqueNo);

    List<OftenContact> searchPhoneInfo(@Param("buildNo") String buildNo);
}
